package com.asialjim.wechat.official.apiservice;

import com.asialjim.wechat.apiservice.ApiService;
import com.asialjim.wechat.core.api.WeChatApiDefaultRes;
import com.asialjim.wechat.official.api.menu.AddConditionalMenuApiResponse;
import com.asialjim.wechat.official.api.menu.GetCurrentSelfMenuInfoApiResponse;
import com.asialjim.wechat.official.api.menu.GetMenuConfigApiResponse;
import com.asialjim.wechat.official.api.menu.TryMatchConditionalMenuApiResponse;
import com.asialjim.wechat.official.menu.OfficialMenu;
import com.asialjim.wechat.official.menu.WeChatMenu;

import java.util.List;

/**
 * <h1><em>ASIAL JIM JAVA DOC</em></h1><hr/>
 * <h2>CLASS DESCRIPTION <i>[ NAME: OfficialMenuService ]</i></h2><strong>
 * <p> menu service for we-chat official account
 * </strong><p><p><em>Copyright &copy; Asial Jim Co., LTD</em><hr/>
 *
 * @author Asial Jim &nbsp;&nbsp; <span>Email:<a href="mailto:asialjim@hotmail.com">asialjim@hotmail.com</a> &nbsp;&nbsp; <a href="asialjim@qq.com">asialjim@qq.com</a></span>
 * @version 1.0.0
 * @since 2021/3/15   &nbsp;&nbsp; JDK 8
 */
public interface OfficialMenuService extends ApiService {

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: addConditionalMenu ]</i></h3>
     * 添加带条件的公众号菜单
     * <p> add conditional menu response
     * @param menu {@link WeChatMenu menu}
     * @return {@link AddConditionalMenuApiResponse api response}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 14:25
     */
    AddConditionalMenuApiResponse addConditionalMenu(WeChatMenu menu);


    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: createSelfMenu ]</i></h3>
     * create we-chat official account application self menu
     * @param menu {@link WeChatMenu menu info}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 11:40
     */
    WeChatApiDefaultRes createSelfMenu(WeChatMenu menu);


    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: deleteConditionalMenu ]</i></h3>
     * delete conditional menu
     * @param menuId {@link String conditional menu id}
     * @return {@link WeChatApiDefaultRes api response}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 14:27
     */
    WeChatApiDefaultRes deleteConditionalMenu(String menuId);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: getCurrentSelfMenuInfo ]</i></h3>
     * get current self menu info for we-chat official account
     * @return {@link GetCurrentSelfMenuInfoApiResponse self menu info}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 13:37
     */
    GetCurrentSelfMenuInfoApiResponse getCurrentSelfMenuInfo();

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: getMenuConfig ]</i></h3>
     * get menu config
     * @return {@link GetMenuConfigApiResponse api response}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 14:31
     */
    GetMenuConfigApiResponse getMenuConfig();

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: tryMatchMenu ]</i></h3>
     * try match conditional menu
     * @param userId {@link String user id: we-chat user open id or user id}
     * @return {@link TryMatchConditionalMenuApiResponse api response}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/3/15 14:35
     */
    TryMatchConditionalMenuApiResponse tryMatchMenu(String userId);

    /**
     * <h3>METHOD DESCRIPTION <i>[ NAME: add ]</i></h3>
     * add menu for we-chat official account
     * @param menu {@link OfficialMenu menu}
     * @return {@link List< OfficialMenu> all menus}
     * @author Asial Jim &nbsp;&nbsp;<span>Email:asialjim@hotmail.com &nbsp;&nbsp; asialjim@qq.com</span>
     * @since 2021/4/5 17:23
     */
    List<OfficialMenu> add(OfficialMenu menu);

    List<OfficialMenu> addAll(List<OfficialMenu> menus);

    void create();
}
